import { POST as post } from '../axios.config.js'

const base = config.ip
const projectName = '/topnet-assess'

// ------------------考核等次管理开始---------------

// 各单位考核最终结果列表
export const getAdminQueryAssessResultList = p =>
  post(`${base}${projectName}/sa-assess-final-result/adminQueryAssessResultList`, p)
// 单位管理员提交所有考核等次
export const adminSubmitAllAssessRank = p =>
  post(`${base}${projectName}/sa-assess-final-result/adminSubmitAllAssessRank`, p)
// 单位管理员提交考核等次
export const adminSubmitAssessRank = p => post(`${base}${projectName}/sa-assess-final-result/adminSubmitAssessRank`, p)
// 单位管理员提交考核等次
export const adminSubmitAssessRankNoLoading = p =>
  post(`${base}${projectName}/sa-assess-final-result/adminSubmitAssessRank`, p, {
    headers: {
      hideLoading: true,
    },
  })
// 组织部确认全部等次
export const orgMakeSureAllAssessRank = p =>
  post(`${base}${projectName}/sa-assess-final-result/orgMakeSureAllAssessRank`, p)
// 组织部修改等次
export const orgModifyAssessRank = p => post(`${base}${projectName}/sa-assess-final-result/orgModifyAssessRank`, p)
// 获取考核等次关联数量
export const getAssessFinalResultNum = p =>
  post(`${base}${projectName}/sa-assess-final-result/getAssessFinalResultNum`, p)
// 组织部考核最终结果列表
export const getOrgQueryAssessResultList = p =>
  post(`${base}${projectName}/sa-assess-final-result/orgQueryAssessResultList`, p)
// 导出考核等次列表数据
export const exportAssessFinalData = p =>
  `${base}${projectName}/sa-assess-final-result/skipValidation/exportAssessFinalData${p}`
// 获取季度考核所有时期数据
export const getQuarterAssessPeriods = p =>
  post(`${base}${projectName}/sa-assess-final-result/getQuarterAssessPeriods`, p)
// 组织部取消等次调整
export const cancleOrgCancelModify = p => post(`${base}${projectName}/sa-assess-final-result/orgCancelModify`, p)
// 获取当前部门参与测评的非公务员列表
export const getNoCivilNeedAssessByOrgId = p =>
  post(`${base}${projectName}/sa-assess-final-result/getNoCivilNeedAssessByOrgId`, p)
// 获取导出列表
export const getListAssessExportFileType = p =>
  post(`${base}${projectName}/sa-assess-final-result/listAssessExportFileType`, p)
// 组织部获取考核最终结果列表
export const getorgQueryLeaderAssessResult = p =>
  post(`${base}${projectName}/sa-assess-final-result/orgQueryLeaderAssessResult`, p)

// ------------------考核等次管理结束--------------

// ------------------考核通知管理开始---------------

// 删除考核配置数据
export const deleteAssessData = p => post(`${base}${projectName}/sa-assess-data/delAssessData`, p)
// 获取考核内容查看记录
export const getReadHistory = p => post(`${base}${projectName}/sa-assess-data/getReadHistory`, p)
// 考核配置数据列表分页查询
export const getAssessDataList = p => post(`${base}${projectName}/sa-assess-data/queryAssessDataList`, p)
// 保存考核配置数据
export const saveAssessData = p => post(`${base}${projectName}/sa-assess-data/saveAssessData`, p)
// 获取考核配置数据详情
export const getSelectAssessDataDetail = p => post(`${base}${projectName}/sa-assess-data/selectAssessDataDetail`, p)
// 新建考核配置数据
export const createAssessData = p => post(`${base}${projectName}/sa-assess-data/createAssessData`, p)
// 获取年份列表
export const getYearList = p => post(`${base}${projectName}/sa-assess-data/getYearList`, p)
// 导出公文
export const exportAssessContentToPdf = p =>
  `${base}${projectName}/sa-assess-data/skipValidation/exportAssessContentToPdf${p}`
// 获取等次管理部门列表
export const listRankOrgan = p => post(`${base}${projectName}/sa-assess-final-result/listRankOrgan`, p)

// ------------------考核通知管理结束---------------
// ------------------等次汇总开始---------------
// 获取考核等次汇总结果列表
export const getAssessCollectResultList = p =>
  post(`${base}${projectName}/sa-assess-final-result/getAssessCollectResultList`, p)
// 导出等次汇总
export const exportAssessCollectResult = p =>
  `${base}${projectName}/sa-assess-final-result/skipValidation/exportAssessCollectResult${p}`
// 获取考核等次汇总统计数据
export const getAssessCollectResultCount = p =>
  post(`${base}${projectName}/sa-assess-final-result/getAssessCollectResultCount`, p)
// ------------------等次汇总结束---------------

// ---------考核设定 开始-------------------

// 获取年份列表
export const getYearListRatio = p => post(`${base}${projectName}/sa-assess-config/getYearList`, p)

// 查询考核比例配置
// export const queryAssessRateConfig = p => post(`${base}${projectName}/sa-assess-config/queryAssessRateConfig`, p)
export const queryAssessRateConfig = p => post(`${base}${projectName}/sa-assess-config/queryAssessRateConfigV2`, p)

// 保存考核比例配置
export const saveAssessRateConfig = p => post(`${base}${projectName}/sa-assess-config/saveAssessRateConfig`, p)

// 获取所有部门
export const getAllOrgan = p => post(`${base}${projectName}/sa-assess-config/getAllOrgan`, p)

// 获取部门下所有人员
export const getAllUserByOrgId = p => post(`${base}${projectName}/sa-assess-config/getAllUserByOrgId`, p)

// 查询不参与考核用户列表
export const queryNoAssessUser = p => post(`${base}${projectName}/sa-assess-config/queryNoAssessUser`, p)

// 保存不参与考核用户
export const saveNoAssessUser = p => post(`${base}${projectName}/sa-assess-config/saveNoAssessUser`, p)

// 删除不参与考核用户
export const delAssessUser = p => post(`${base}${projectName}/sa-assess-config/delAssessUser`, p)

// 获取机动名额相关数据
export const getMobileQuotaData = p => post(`${base}${projectName}/sa-assess-config/getMobileQuotaData`, p)

// 保存全区总人数和比例计算为好的数量
export const saveCountData = p => post(`${base}${projectName}/sa-assess-config/saveCountData`, p)

// ==========人员管理===============

// 查询考核用户列表
export const getqueryAssessUser = p => post(`${base}${projectName}/sa-assess-config/queryAssessUser`, p)

// 查询考核用户详细信息
export const getAssessUserDetail = p => post(`${base}${projectName}/sa-assess-config/getAssessUserDetail`, p)

// 获取参评机构及负责人列表
export const getlistOrgAndLeader = p => post(`${base}${projectName}/sa-assess-config/listOrgAndLeader`, p)

// 保存考核用户
export const saveAssessUser = p => post(`${base}${projectName}/sa-assess-config/saveAssessUser`, p)

// 根据代码类型查询对应的权限代码表
export const queryUiasCodeInfo = p => post(`${base}${projectName}/code-public/queryUiasCodeInfo`, p)

// 获取等次确认按钮展示状态
export const getMakeSureRankStatus = p => post(`${base}${projectName}/sa-assess-final-result/getMakeSureRankStatus`, p)

// 控制局长的等次确认弹窗显示
export const controlRankTipsShow = p => post(`${base}${projectName}/sa-assess-final-result/controlRankTipsShow`, p)

// 人事处管理员操作公示全部单位等次
export const showAllOrgAssessRank = p => post(`${base}${projectName}/sa-assess-final-result/showAllOrgAssessRank`, p)

// 总负责人获取等次提示弹窗内容
export const getRankTipsContent = p => post(`${base}${projectName}/sa-assess-final-result/getRankTipsContent`, p)

// 局长控制等次确认弹窗不再显示
export const controlRankTipsUnRemind = p =>
  post(`${base}${projectName}/sa-assess-final-result/controlRankTipsUnRemind`, p)

// 总负责人确认全部单位等次
export const makeSureAllOrgAssessRank = p =>
  post(`${base}${projectName}/sa-assess-final-result/makeSureAllOrgAssessRank`, p)

// 等次汇总导出
export const exportAllAssessFinalData = p =>
  `${base}${projectName}/sa-assess-final-result/skipValidation/exportAllAssessFinalData${p}`

// 统计考核等次各项数据
export const sumAssessResultCount = p => post(`${base}${projectName}/sa-assess-final-result/sumAssessResultCount`, p)

// 组织部取消等次调整 -- 负责人
export const cancleOrgCancelModifyLeader = p =>
  post(`${base}${projectName}/sa-assess-final-result/orgCancelModifyLeader`, p)
